<!-- 导航条 -->
<div class="bg-white bread-crumb">
    <ul class="breadcrumb b-a m-b-n-xs lter b-b wrapper-md">
        <li><a ui-sref="app.dashboard"><i class="fa fa-home"></i> 首页</a></li>
        <li><a ui-sref="app.sys.role.list">角色管理</a></li>
        <li class="active" ng-bind="title"></li>
        <button class="btn btn-sm btn-icon btn-default pull-right" ng-click="$state.reload()"><i
                class="icon icon-refresh"></i></button>
    </ul>
</div>
<div class="wrapper-md">
    <div class="panel panel-default">
        <div class="panel-body">
            <form name="form" class="form-horizontal form-validation">
                <div class="form-group">
                    <label class="col-sm-2 control-label"><span class="text-danger wrapper-sm">*</span>名称</label>
                    <div class="col-sm-10">
                        <input type="text" ng-model="role.name" class="form-control w-md" ng-maxlength="100" required>
                        <span class="help-block m-b-none">角色名称必须以 ROLE_ 开头</span>
                    </div>
                </div>
                <div class="line line-dashed b-b line-lg pull-in"></div>
                <div class="form-group">
                    <label class="col-sm-2 control-label"><span class="text-danger wrapper-sm">*</span>是否可用</label>
                    <div class="col-sm-10">
                        <label class="radio-inline" ng-repeat="item in yes_no">
                            <input type="radio" name="enabled" ng-model="role.enabled" ng-value="item.key"> {{item.value}}
                        </label>
                        <span class="help-block m-b-none">“是”代表此角色可用，“否”则表示此角色被锁定</span>
                    </div>
                </div>
                <div class="line line-dashed b-b line-lg pull-in"></div>
                <div class="form-group">
                    <label class="col-sm-2 control-label">角色授权</label>
                    <div class="col-sm-10">
                        <div
                                ivh-treeview="menus"
                                ivh-treeview-options="treeOpts">
                        </div>
                    </div>
                </div>
                <div class="line line-dashed b-b line-lg pull-in"></div>
                <div class="form-group">
                    <label class="col-sm-2 control-label">备注</label>
                    <div class="col-sm-10">
                        <textarea ng-model="role.remarks" rows="6" class="form-control" ng-maxlength="255"></textarea>
                    </div>
                </div>
                <div class="line line-dashed b-b line-lg pull-in"></div>
                <div class="form-group">
                    <div class="col-sm-4 col-sm-offset-2">
                        <button type="button" class="btn btn-default" ng-disabled="form.$invalid"
                                ng-if="hasAuthority('sys:role:edit')" ng-click="saveData()">
                            保存
                        </button>
                        <a class="btn btn-primary" ui-sref="app.sys.role.list">取消</a>
                    </div>
                </div>
            </form>
        </div>
    </div>
</div>